<?php
use yii\widgets\ActiveForm;
?>
<link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="../static/css/admin.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.theme.default.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datatables/jquery.dataTables.css" type="text/css">
<style>
.ul_tree_display {
	display: none;
}

.tr_tree_display {
	display: none;
}

.table>tbody>tr>td {
	vertical-align: middle;
	font-size: 0.8em;
}

.layui-layer-content p {
	padding: 15px;
}

.dataTables_length {
	margin-top: 10px;
}
</style>
<div class="tabs-panel">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<div class="box-header">
					<button type="button" class="btn btn-success depart-modal category-show-btn add-article-category" style="width: 100px;">添加</button>
				</div>
				<div class="box-body">
					<table id="tableid" class="table table-bordered table-hover">
						<thead>
							<tr>
								<th class="">操作</th>
								<th class="">ID</th>
								<th class="">分类名称</th>
								<th class="">SEO维护</th>
								<th class="">排序</th>
								<th class=""><?=TITLE_STATUS?></th>
								<th class="">显示首页</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="article-category-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width: 50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">文章分类</h4>
            </div>
            <div class="modal-body">
                <form action="/article/change-article-category" method="post" name="article_category_form" id="article_category_form">
                    <div class="box-body">
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>分类名称</label>
                            <input style="width: 50%;" class="form-control" name="category_title" id="category_title" placeholder="分类名称" type="text">
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>排序</label>
                            <input style="width: 50%;" class="form-control" name="sort" id="sort" placeholder="分类排序" type="text">
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>分类图片</label>
                            <button type="button" class="btn btn-success depart-modal upload-img-btn-main" style="width: 100px;">上传</button>
                            <input name="category_pic" id="category_pic" value="" class="form-control" type="hidden">
                            <button onclick="showImg($('#category_pic').val())" type="button" class="btn btn-success depart-modal show-img-btn hide">查看图片</button>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>状态</label>
                            <select name="use_flg" id="use_flg" style="width: 25%;"  class="form-control">
                            	<option value="1">启用</option>
                            	<option value="0">禁用</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>显示首页</label>
                            <select name="is_display" id="is_display" style="width: 25%;"  class="form-control">
                            	<option value="1">显示</option>
                            	<option value="0">不显示</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add">分类描述</label>
                            <textarea style="width: 50%;" class="form-control" name="memo" id="memo" placeholder="分类描述"></textarea>
                        </div>
                        <input name="category_id" type="hidden" id="category_id">
                    </div>
                </form>
                <div style="display: none">
                    <?php $form = ActiveForm::begin(['id'=>'upload_form_update','action'=>'/common/img-upload'],['options' => ['enctype' => 'multipart/form-data']]) ?>
                    <?= $form->field($model, 'img_url')->fileInput(['class' => 'upload_file_ot']) ?>
                    <?php ActiveForm::end() ?>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <a type="button" class="btn btn-primary ajax_post_tag">提交</a>
            </div>
        </div>
    </div>
</div>
<?php include ('../views/seo/seo-modal.php');?>
<input type="hidden" name="imageBathUrl" id="imageBathUrl" value="<?php echo Yii::$app->params['imageBathUrl'] . '/' ?>">
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="/static/plugins/treeTable/jquery.treetable.js"></script>
<!--图片上传插件用-->
<script type="text/javascript" src="/static/plugins/jquery.form.js"></script>
<!--图片显示用-->
<script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript"  src="/static/app/article/category.js?version=<?=Yii::$app->params['version']?>"></script>